import request from '../utils/request'

export default {
  pageArticle(current,limit) {
    return request({
      //url: '/eduservice/teacher/pageTeacherCondition/'+current+"/"+limit,
      url: `/news_main/news-article/pageArticle/${current}/${limit}`,
      method: 'post',
    })
  },
  addArticle(article){
    return request({
      url: `/news_main/news-article/addArticle`,
      method: 'post',
      data: article
    })
  },
  deleteArticleById(id){
    return request({
      url: `/news_main/news-article/addArticle`,
      method: 'post',
    })
  },
  kindArticle(kind){
    return request({
      url: `/news_main/news-article/kindArticle/${kind}`,
      method: 'post',

    })
  },
  search(keyword,current,limit) {
    return request({
      url: `/news_main/search/${keyword}/${current}/${limit}`,
      method: 'get'
    })
  },
  getById(id) {
    return request({
      url: `/news_main/news-article/getArticleById/${id}`,
      method: 'get'
    })
  },

  count(id) {
    return request({
      url: `/readCount/count/${id}`,
      method: 'post'
    })
  },

  getHot() {
    return request({
      url: `/readCount/getHot`,
      method: 'get'
    })
  },

  dianzan(kind,id) {
    return request({
      url: `/readCount/${kind}/${id}`,
      method: 'get'
    })
  },
  getInfo(id) {
    return request({
      url: `/readCount/getInfo/${id}`,
      method: 'get'
    })
  },
  KindPageArticle(kind,current,limit) {
    return request({
      //url: '/eduservice/teacher/pageTeacherCondition/'+current+"/"+limit,
      url: `/news_main/news-article/kindPageArticle/${kind}/${current}/${limit}`,
      method: 'post',
    })
  },

}
